package com.joseph.base;

import java.io.Serializable;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.dozer.DozerBeanMapper;

/**
 * @description 
 * @author Joseph_Mok
 * @date 2016年1月21日下午4:10:14
 */

@SuppressWarnings("serial")
public abstract class BaseModel implements Serializable {

	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this);
	}
	
	public BaseDto toDto() {
		DozerBeanMapper mapper = new DozerBeanMapper();
		return mapper.map(this, BaseDto.class);
	}
	
}
